<!DOCTYPE HTML>
<html>

<head>
    <title><%= title %>管理系统</title>
    <link rel="stylesheet" href="/stylesheets/style.css">
    <link rel="shortcut icon" href="<%= favicon %>">
</head>

<body>
    <div class="comment-main">
        <div class="header">
            <div class="title"><span><%= title %></span></div>

            <div class="logout-wrapper"><a href="/logout">退出登录</a></div>
        </div>

        <ul class="content">
            <% for(var i = 0; i < comment_list.length; i++) { %>
            <li class="vcard">
                <div class="vhead">
                    <% if(comment_list[i].get('link')) { %>
                    <% var link = comment_list[i].get('link'); %>
                    <% if(link.indexOf("//") != -1) { %>
                    <a href="<%= link %>" target="_blank" rel="nofollow"> <%= comment_list[i].get('nick') %></a>
                    <% } else { %>
                    <a href="//<%= link %>" target="_blank" rel="nofollow"> <%= comment_list[i].get('nick') %></a>
                    <% } %>
                    <% } else { %>
                    <span id="nick"><%= comment_list[i].get('nick') %></span>
                    <% } %>
                    <% var date = comment_list[i].get('createdAt') %>
                    <% if(comment_list[i].get('mail')) { %>
                    <span class="spacer">•</span><span class="vtime"><%= comment_list[i].get('mail') %></span>
                    <% } %>
                    <!-- <span class="spacer">•</span><span class="vtime"><%= date %></span> -->

                    <span class="spacer">•</span><span class="vtime"><%= zone %></span>
                    <span class="spacer">•</span><span
                        class="vtime"><%= moment.parseZone(date).utcOffset(8).format('YYYY-MM-DD HH:mm:ss'); %></span>
                </div>
                <div class="vcomment">
                    <%- comment_list[i].get('comment') %>
                </div>
                <div class="check">
                    <% if(comment_list[i].get('isSpam')) { %>
                    <a href="/comments/not-spam?id=<%= comment_list[i].get('objectId') %>" rel="nofollow">这不是垃圾评论</a>
                    <% } else { %>
                    <a href="/comments/mark-spam?id=<%= comment_list[i].get('objectId') %>" rel="nofollow">标记为垃圾评论</a>
                    <% } %>
                    <span class="spacer">•</span>
                    <a class="red" href="/comments/delete?id=<%= comment_list[i].get('objectId') %>"
                        rel="nofollow">删除</a>
                    <span class="spacer">•</span>
                    <!-- <a class="blue"
                        href="<%= process.env.SITE_URL+comment_list[i].get('url')+'#' + comment_list[i].get('objectId') %>"
                        target="_blank" rel="nofollow">查看评论</a> -->
                    <a class="blue"
                    href="<%= process.env.SITE_URL+comment_list[i].get('url') %>"
                    target="_blank" rel="nofollow">查看评论</a>
                    <% if (comment_list[i].get('rid')) { %>
                    <% if(comment_list[i].get('isNotified')) { %>
                    <span class="spacer">•</span><span class="vnoticed">通知已送达✔</span>
                    <% } else { %>
                    <span class="spacer">•</span>
                    <a href="/comments/resend-email?id=<%= comment_list[i].get('objectId') %>" rel="nofollow">重发通知邮件</a>
                    <% } %>
                    <% } %>
                </div>

            </li>
            <% } %>
        </ul>
    </div>
</body>

</html>